package commonDataStructures;

import java.util.ArrayList;

public class PQueue<E> implements PrimitiveCollection<E>{

	private ArrayList<E> _queue;
	
	public void init(){
		_queue.clear();
	}
	
	public PQueue(){
		_queue = new ArrayList<E>();
	}
	@Override
	public void insert(E e) {
		_queue.add(e);
		
	}

	@Override
	public boolean isEmpty() {
		return _queue.isEmpty();
	}

	@Override
	public E remove() {
		return _queue.remove(_queue.size()-1);
	}

	@Override
	public int size() {
		return _queue.size();
	}

}
